<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Input 输入框 | MyUI 4.x</title>
    <meta name="generator" content="VuePress 1.5.4">
    <link rel="icon" href="/my/favicon.ico">
    <script>
      var _hmt = _hmt || [];
      (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?c4e5f73318b5cb0c389e3d9a05f831cc";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
    <meta name="description" content="MyUI是美亚柏科旗下新德汇出品的Web前端一站式项目工程框架，专注于公检法行业中台系统快速搭建，框架已在多个项目实战检验。">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <link rel="preload" href="/my/assets/css/0.styles.810d4cba.css" as="style"><link rel="preload" href="/my/assets/js/app.2dbd0b81.js" as="script"><link rel="preload" href="/my/assets/js/493.009afff8.js" as="script"><link rel="preload" href="/my/assets/js/1316.f081d655.js" as="script"><link rel="preload" href="/my/assets/js/1031.8d6cd2c9.js" as="script">
    <link rel="stylesheet" href="/my/assets/css/0.styles.810d4cba.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/my/" class="home-link router-link-active"><img src="/my/img/logo.png" alt="MyUI 4.x" class="logo"> <span class="site-name can-hide">MyUI 4.x</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/my/guide/" class="nav-link">
  指南
</a></div><div class="nav-item"><a href="/my/ui/components/" class="nav-link">
  组件
</a></div><div class="nav-item"><a href="/my/ui/charts/" class="nav-link">
  图表
</a></div><div class="nav-item"><a href="/my/ui/map/" class="nav-link">
  地图
</a></div><div class="nav-item"><a href="/my/ui/go/" class="nav-link">
  关系图
</a></div><div class="nav-item"><a href="/my/ui/icon/" class="nav-link">
  图标
</a></div><div class="nav-item"><a href="/my/ui/pages/" class="nav-link">
  页面
</a></div><div class="nav-item"><a href="http://newgateway.gitee.io/my-web/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  演示
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="JSDoc" class="dropdown-title"><span class="title">JSDoc</span> <span class="arrow down"></span></button> <button type="button" aria-label="JSDoc" class="mobile-dropdown-title"><span class="title">JSDoc</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/my/api/components.html" class="nav-link">
  基础组件
</a></li><li class="dropdown-item"><!----> <a href="/my/api/utils.html" class="nav-link">
  工具函数
</a></li><li class="dropdown-item"><!----> <a href="/my/api/charts.html" class="nav-link">
  图表组件
</a></li><li class="dropdown-item"><!----> <a href="/my/api/map.html" class="nav-link">
  地图组件
</a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/my/guide/" class="nav-link">
  指南
</a></div><div class="nav-item"><a href="/my/ui/components/" class="nav-link">
  组件
</a></div><div class="nav-item"><a href="/my/ui/charts/" class="nav-link">
  图表
</a></div><div class="nav-item"><a href="/my/ui/map/" class="nav-link">
  地图
</a></div><div class="nav-item"><a href="/my/ui/go/" class="nav-link">
  关系图
</a></div><div class="nav-item"><a href="/my/ui/icon/" class="nav-link">
  图标
</a></div><div class="nav-item"><a href="/my/ui/pages/" class="nav-link">
  页面
</a></div><div class="nav-item"><a href="http://newgateway.gitee.io/my-web/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  演示
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="JSDoc" class="dropdown-title"><span class="title">JSDoc</span> <span class="arrow down"></span></button> <button type="button" aria-label="JSDoc" class="mobile-dropdown-title"><span class="title">JSDoc</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/my/api/components.html" class="nav-link">
  基础组件
</a></li><li class="dropdown-item"><!----> <a href="/my/api/utils.html" class="nav-link">
  工具函数
</a></li><li class="dropdown-item"><!----> <a href="/my/api/charts.html" class="nav-link">
  图表组件
</a></li><li class="dropdown-item"><!----> <a href="/my/api/map.html" class="nav-link">
  地图组件
</a></li></ul></div></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Basic</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>Form</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/my/element/cascader.html" class="sidebar-link">Cascader 级联选择器</a></li><li><a href="/my/element/checkbox.html" class="sidebar-link">Checkbox 多选框</a></li><li><a href="/my/element/color-picker.html" class="sidebar-link">ColorPicker 颜色选择器</a></li><li><a href="/my/element/date-picker.html" class="sidebar-link">DatePicker 日期选择器</a></li><li><a href="/my/element/datetime-picker.html" class="sidebar-link">DateTimePicker 日期时间选择器</a></li><li><a href="/my/element/form.html" class="sidebar-link">Form 表单</a></li><li><a href="/my/element/input.html" aria-current="page" class="active sidebar-link">Input 输入框</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/my/element/input.html#基础用法" class="sidebar-link">基础用法</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#禁用状态" class="sidebar-link">禁用状态</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#可清空" class="sidebar-link">可清空</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#密码框" class="sidebar-link">密码框</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#带-icon-的输入框" class="sidebar-link">带 icon 的输入框</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#文本域" class="sidebar-link">文本域</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#可自适应文本高度的文本域" class="sidebar-link">可自适应文本高度的文本域</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#复合型输入框" class="sidebar-link">复合型输入框</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#尺寸" class="sidebar-link">尺寸</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#带输入建议" class="sidebar-link">带输入建议</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#自定义模板" class="sidebar-link">自定义模板</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#远程搜索" class="sidebar-link">远程搜索</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#输入长度限制" class="sidebar-link">输入长度限制</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#input-attributes" class="sidebar-link">Input Attributes</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#input-slots" class="sidebar-link">Input Slots</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#input-events" class="sidebar-link">Input Events</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#input-methods" class="sidebar-link">Input Methods</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#autocomplete-attributes" class="sidebar-link">Autocomplete Attributes</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#autocomplete-slots" class="sidebar-link">Autocomplete Slots</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#autocomplete-scoped-slot" class="sidebar-link">Autocomplete Scoped Slot</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#autocomplete-events" class="sidebar-link">Autocomplete Events</a></li><li class="sidebar-sub-header"><a href="/my/element/input.html#autocomplete-methods" class="sidebar-link">Autocomplete Methods</a></li></ul></li><li><a href="/my/element/input-number.html" class="sidebar-link">InputNumber 计数器</a></li><li><a href="/my/element/radio.html" class="sidebar-link">Radio 单选框</a></li><li><a href="/my/element/rate.html" class="sidebar-link">Rate 评分</a></li><li><a href="/my/element/select.html" class="sidebar-link">Select 选择器</a></li><li><a href="/my/element/slider.html" class="sidebar-link">Slider 滑块</a></li><li><a href="/my/element/switch.html" class="sidebar-link">Switch 开关</a></li><li><a href="/my/element/time-picker.html" class="sidebar-link">TimePicker 时间选择器</a></li><li><a href="/my/element/transfer.html" class="sidebar-link">Transfer 穿梭框</a></li><li><a href="/my/element/upload.html" class="sidebar-link">Upload 上传</a></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Data</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Notice</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Navigation</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Others</span> <span class="arrow right"></span></p> <!----></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="input-输入框"><a href="#input-输入框" class="header-anchor">#</a> Input 输入框</h1> <p>通过鼠标或键盘输入字符</p> <div class="custom-block warning"><p class="custom-block-title">WARNING</p> <p>Input 为受控组件，它<strong>总会显示 Vue 绑定值</strong>。</p> <p>通常情况下，应当处理 <code>input</code> 事件，并更新组件的绑定值（或使用<code>v-model</code>）。否则，输入框内显示的值将不会改变。</p> <p>不支持 <code>v-model</code> 修饰符。</p></div> <h2 id="基础用法"><a href="#基础用法" class="header-anchor">#</a> 基础用法</h2> <!----><h2 id="禁用状态"><a href="#禁用状态" class="header-anchor">#</a> 禁用状态</h2> <!----><h2 id="可清空"><a href="#可清空" class="header-anchor">#</a> 可清空</h2> <!----><h2 id="密码框"><a href="#密码框" class="header-anchor">#</a> 密码框</h2> <!----><h2 id="带-icon-的输入框"><a href="#带-icon-的输入框" class="header-anchor">#</a> 带 icon 的输入框</h2> <p>带有图标标记输入类型</p> <!----><h2 id="文本域"><a href="#文本域" class="header-anchor">#</a> 文本域</h2> <p>用于输入多行文本信息，通过将 <code>type</code> 属性的值指定为 textarea。</p> <!----><h2 id="可自适应文本高度的文本域"><a href="#可自适应文本高度的文本域" class="header-anchor">#</a> 可自适应文本高度的文本域</h2> <p>通过设置 <code>autosize</code> 属性可以使得文本域的高度能够根据文本内容自动进行调整，并且 <code>autosize</code> 还可以设定为一个对象，指定最小行数和最大行数。</p> <!----><h2 id="复合型输入框"><a href="#复合型输入框" class="header-anchor">#</a> 复合型输入框</h2> <p>可前置或后置元素，一般为标签或按钮</p> <!----><h2 id="尺寸"><a href="#尺寸" class="header-anchor">#</a> 尺寸</h2> <!----><h2 id="带输入建议"><a href="#带输入建议" class="header-anchor">#</a> 带输入建议</h2> <p>根据输入内容提供对应的输入建议</p> <!----><h2 id="自定义模板"><a href="#自定义模板" class="header-anchor">#</a> 自定义模板</h2> <p>可自定义输入建议的显示</p> <!----><h2 id="远程搜索"><a href="#远程搜索" class="header-anchor">#</a> 远程搜索</h2> <p>从服务端搜索数据</p> <!----><h2 id="输入长度限制"><a href="#输入长度限制" class="header-anchor">#</a> 输入长度限制</h2> <!----><h2 id="input-attributes"><a href="#input-attributes" class="header-anchor">#</a> Input Attributes</h2> <table><thead><tr><th>参数</th> <th>说明</th> <th>类型</th> <th>可选值</th> <th>默认值</th></tr></thead> <tbody><tr><td>type</td> <td>类型</td> <td>string</td> <td>text，textarea 和其他 <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types" target="_blank" rel="noopener noreferrer">原生 input 的 type 值<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></td> <td>text</td></tr> <tr><td>value / v-model</td> <td>绑定值</td> <td>string / number</td> <td>—</td> <td>—</td></tr> <tr><td>maxlength</td> <td>原生属性，最大输入长度</td> <td>number</td> <td>—</td> <td>—</td></tr> <tr><td>minlength</td> <td>原生属性，最小输入长度</td> <td>number</td> <td>—</td> <td>—</td></tr> <tr><td>show-word-limit</td> <td>是否显示输入字数统计，只在 <code>type = &quot;text&quot;</code> 或 <code>type = &quot;textarea&quot;</code> 时有效</td> <td>boolean</td> <td>—</td> <td>false</td></tr> <tr><td>placeholder</td> <td>输入框占位文本</td> <td>string</td> <td>—</td> <td>—</td></tr> <tr><td>clearable</td> <td>是否可清空</td> <td>boolean</td> <td>—</td> <td>false</td></tr> <tr><td>show-password</td> <td>是否显示切换密码图标</td> <td>boolean</td> <td>—</td> <td>false</td></tr> <tr><td>disabled</td> <td>禁用</td> <td>boolean</td> <td>—</td> <td>false</td></tr> <tr><td>size</td> <td>输入框尺寸，只在 <code>type!=&quot;textarea&quot;</code> 时有效</td> <td>string</td> <td>medium / small / mini</td> <td>—</td></tr> <tr><td>prefix-icon</td> <td>输入框头部图标</td> <td>string</td> <td>—</td> <td>—</td></tr> <tr><td>suffix-icon</td> <td>输入框尾部图标</td> <td>string</td> <td>—</td> <td>—</td></tr> <tr><td>rows</td> <td>输入框行数，只对 <code>type=&quot;textarea&quot;</code> 有效</td> <td>number</td> <td>—</td> <td>2</td></tr> <tr><td>autosize</td> <td>自适应内容高度，只对 <code>type=&quot;textarea&quot;</code> 有效，可传入对象，如，{ minRows: 2, maxRows: 6 }</td> <td>boolean / object</td> <td>—</td> <td>false</td></tr> <tr><td>autocomplete</td> <td>原生属性，自动补全</td> <td>string</td> <td>on, off</td> <td>off</td></tr> <tr><td>auto-complete</td> <td>下个主版本弃用</td> <td>string</td> <td>on, off</td> <td>off</td></tr> <tr><td>name</td> <td>原生属性</td> <td>string</td> <td>—</td> <td>—</td></tr> <tr><td>readonly</td> <td>原生属性，是否只读</td> <td>boolean</td> <td>—</td> <td>false</td></tr> <tr><td>max</td> <td>原生属性，设置最大值</td> <td>—</td> <td>—</td> <td>—</td></tr> <tr><td>min</td> <td>原生属性，设置最小值</td> <td>—</td> <td>—</td> <td>—</td></tr> <tr><td>step</td> <td>原生属性，设置输入字段的合法数字间隔</td> <td>—</td> <td>—</td> <td>—</td></tr> <tr><td>resize</td> <td>控制是否能被用户缩放</td> <td>string</td> <td>none, both, horizontal, vertical</td> <td>—</td></tr> <tr><td>autofocus</td> <td>原生属性，自动获取焦点</td> <td>boolean</td> <td>true, false</td> <td>false</td></tr> <tr><td>form</td> <td>原生属性</td> <td>string</td> <td>—</td> <td>—</td></tr> <tr><td>label</td> <td>输入框关联的label文字</td> <td>string</td> <td>—</td> <td>—</td></tr> <tr><td>tabindex</td> <td>输入框的tabindex</td> <td>string</td> <td>-</td> <td>-</td></tr> <tr><td>validate-event</td> <td>输入时是否触发表单的校验</td> <td>boolean</td> <td>-</td> <td>true</td></tr></tbody></table> <h2 id="input-slots"><a href="#input-slots" class="header-anchor">#</a> Input Slots</h2> <table><thead><tr><th>name</th> <th>说明</th></tr></thead> <tbody><tr><td>prefix</td> <td>输入框头部内容，只对 <code>type=&quot;text&quot;</code> 有效</td></tr> <tr><td>suffix</td> <td>输入框尾部内容，只对 <code>type=&quot;text&quot;</code> 有效</td></tr> <tr><td>prepend</td> <td>输入框前置内容，只对 <code>type=&quot;text&quot;</code> 有效</td></tr> <tr><td>append</td> <td>输入框后置内容，只对 <code>type=&quot;text&quot;</code> 有效</td></tr></tbody></table> <h2 id="input-events"><a href="#input-events" class="header-anchor">#</a> Input Events</h2> <table><thead><tr><th>事件名称</th> <th>说明</th> <th>回调参数</th></tr></thead> <tbody><tr><td>blur</td> <td>在 Input 失去焦点时触发</td> <td>(event: Event)</td></tr> <tr><td>focus</td> <td>在 Input 获得焦点时触发</td> <td>(event: Event)</td></tr> <tr><td>change</td> <td>仅在输入框失去焦点或用户按下回车时触发</td> <td>(value: string | number)</td></tr> <tr><td>input</td> <td>在 Input 值改变时触发</td> <td>(value: string | number)</td></tr> <tr><td>clear</td> <td>在点击由 <code>clearable</code> 属性生成的清空按钮时触发</td> <td>—</td></tr></tbody></table> <h2 id="input-methods"><a href="#input-methods" class="header-anchor">#</a> Input Methods</h2> <table><thead><tr><th>方法名</th> <th>说明</th> <th>参数</th></tr></thead> <tbody><tr><td>focus</td> <td>使 input 获取焦点</td> <td>—</td></tr> <tr><td>blur</td> <td>使 input 失去焦点</td> <td>—</td></tr> <tr><td>select</td> <td>选中 input 中的文字</td> <td>—</td></tr></tbody></table> <h2 id="autocomplete-attributes"><a href="#autocomplete-attributes" class="header-anchor">#</a> Autocomplete Attributes</h2> <table><thead><tr><th>参数</th> <th>说明</th> <th>类型</th> <th>可选值</th> <th>默认值</th></tr></thead> <tbody><tr><td>placeholder</td> <td>输入框占位文本</td> <td>string</td> <td>—</td> <td>—</td></tr> <tr><td>disabled</td> <td>禁用</td> <td>boolean</td> <td>—</td> <td>false</td></tr> <tr><td>value-key</td> <td>输入建议对象中用于显示的键名</td> <td>string</td> <td>—</td> <td>value</td></tr> <tr><td>value</td> <td>必填值，输入绑定值</td> <td>string</td> <td>—</td> <td>—</td></tr> <tr><td>debounce</td> <td>获取输入建议的去抖延时</td> <td>number</td> <td>—</td> <td>300</td></tr> <tr><td>placement</td> <td>菜单弹出位置</td> <td>string</td> <td>top / top-start / top-end / bottom / bottom-start / bottom-end</td> <td>bottom-start</td></tr> <tr><td>fetch-suggestions</td> <td>返回输入建议的方法，仅当你的输入建议数据 resolve 时，通过调用 callback(data:[]) 来返回它</td> <td>Function(queryString, callback)</td> <td>—</td> <td>—</td></tr> <tr><td>popper-class</td> <td>Autocomplete 下拉列表的类名</td> <td>string</td> <td>—</td> <td>—</td></tr> <tr><td>trigger-on-focus</td> <td>是否在输入框 focus 时显示建议列表</td> <td>boolean</td> <td>—</td> <td>true</td></tr> <tr><td>name</td> <td>原生属性</td> <td>string</td> <td>—</td> <td>—</td></tr> <tr><td>select-when-unmatched</td> <td>在输入没有任何匹配建议的情况下，按下回车是否触发 <code>select</code> 事件</td> <td>boolean</td> <td>—</td> <td>false</td></tr> <tr><td>label</td> <td>输入框关联的label文字</td> <td>string</td> <td>—</td> <td>—</td></tr> <tr><td>prefix-icon</td> <td>输入框头部图标</td> <td>string</td> <td>—</td> <td>—</td></tr> <tr><td>suffix-icon</td> <td>输入框尾部图标</td> <td>string</td> <td>—</td> <td>—</td></tr> <tr><td>hide-loading</td> <td>是否隐藏远程加载时的加载图标</td> <td>boolean</td> <td>—</td> <td>false</td></tr> <tr><td>popper-append-to-body</td> <td>是否将下拉列表插入至 body 元素。在下拉列表的定位出现问题时，可将该属性设置为 false</td> <td>boolean</td> <td>-</td> <td>true</td></tr> <tr><td>highlight-first-item</td> <td>是否默认突出显示远程搜索建议中的第一项</td> <td>boolean</td> <td>—</td> <td>false</td></tr></tbody></table> <h2 id="autocomplete-slots"><a href="#autocomplete-slots" class="header-anchor">#</a> Autocomplete Slots</h2> <table><thead><tr><th>name</th> <th>说明</th></tr></thead> <tbody><tr><td>prefix</td> <td>输入框头部内容</td></tr> <tr><td>suffix</td> <td>输入框尾部内容</td></tr> <tr><td>prepend</td> <td>输入框前置内容</td></tr> <tr><td>append</td> <td>输入框后置内容</td></tr></tbody></table> <h2 id="autocomplete-scoped-slot"><a href="#autocomplete-scoped-slot" class="header-anchor">#</a> Autocomplete Scoped Slot</h2> <table><thead><tr><th>name</th> <th>说明</th></tr></thead> <tbody><tr><td>—</td> <td>自定义输入建议，参数为 { item }</td></tr></tbody></table> <h2 id="autocomplete-events"><a href="#autocomplete-events" class="header-anchor">#</a> Autocomplete Events</h2> <table><thead><tr><th>事件名称</th> <th>说明</th> <th>回调参数</th></tr></thead> <tbody><tr><td>select</td> <td>点击选中建议项时触发</td> <td>选中建议项</td></tr></tbody></table> <h2 id="autocomplete-methods"><a href="#autocomplete-methods" class="header-anchor">#</a> Autocomplete Methods</h2> <table><thead><tr><th>方法名</th> <th>说明</th> <th>参数</th></tr></thead> <tbody><tr><td>focus</td> <td>使 input 获取焦点</td> <td>-</td></tr></tbody></table></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="/my/element/form.html" class="prev">
        Form 表单
      </a></span> <span class="next"><a href="/my/element/input-number.html">
        InputNumber 计数器
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"></div></div>
    <script src="/my/assets/js/app.2dbd0b81.js" defer></script><script src="/my/assets/js/493.009afff8.js" defer></script><script src="/my/assets/js/1316.f081d655.js" defer></script><script src="/my/assets/js/1031.8d6cd2c9.js" defer></script>
  </body>
</html>
